﻿using System;
using Senparc.Weixin.MP;

namespace Kugar.Web.Wechat.Enums
{
    public enum  WechatOAuthScope
    {
        snsapi_base=0,

        snsapi_userinfo=1,

    }

    internal static class ConvertHelper
    {
        public static OAuthScope ConvertToOAuthScope(WechatOAuthScope scope)
        {
            switch (scope)
            {
                case WechatOAuthScope.snsapi_base:
                    return OAuthScope.snsapi_base;
                case WechatOAuthScope.snsapi_userinfo:
                    return OAuthScope.snsapi_userinfo;
                default:
                    throw new ArgumentOutOfRangeException(nameof(scope), scope, null);
            }
        }
    }
}
